
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" >

	<ui:composition template="/templates/common.xhtml">

		<ui:define name="pageTitle">Tickets Web</ui:define>

		<ui:define name="pageHeader">Autenticação</ui:define>

		<ui:define name="body">
			<h:form id="login">
			<h:messages style="color: red; font-weight: bold;"/>
			
	  
        <h:panelGrid columns="2">
				<h:outputLabel value="e-Mail:" for="email" align="right"/>
				<h:panelGroup>
					<h:inputText id="email" 
						label="e-Mail" 
						value="#{loginBean.email}" 
						size="30" maxlength="30" required="true"
						 
						validatorMessage="e-Mail inválido">
						<f:validateRegex pattern="[a-zA-Z0-9\-\_\.]+@[a-zA-Z0-9\-\_\.]+"/>
					</h:inputText>
					<!--  <h:message for="email"/> --> 
				</h:panelGroup>
				<h:outputLabel value="Senha:" for="senha" align="right"/>
				<h:inputSecret id="senha" label="Senha" value="#{loginBean.senha}" size="10" maxlength="10" required="true" redisplay="true"/>
				
				
				</h:panelGrid>
	  
    
			
						
			<h:commandButton action="#{loginBean.login}" value="Entrar"/>
			
		</h:form>
		</ui:define>
	</ui:composition>
</html>